

#ifndef BESTFIT_H_
#define BESTFIT_H_

#include "Area.h"
#include "Allocator.h"
#include <list>
#include <iostream>

class BestFit: public Allocator
{
private:
    std::list<Area*> * areas;

public:
	BestFit();
	virtual ~BestFit();

	void setSize(int size);

	const Area * alloc(int wanted);
	void free(const Area * ap);
	int getUsedMemory();
	int getRequiredMemory();
	double GetFragmentationRate();

	void print();
};

#endif /* BESTFIT_H_ */
